﻿@{
	string FlowID = Request.QueryString["flowid"];
	string StepID = Request.QueryString["stepid"];
	string GroupID = Request.QueryString["groupid"];
	string TaskID = Request.QueryString["taskid"];
	string InstanceID = Request.QueryString["instanceid"];
	string DisplayModel = Request.QueryString["display"] ?? "0";
	string DBConnID = "06075250-30dc-4d32-bf97-e922cb30fac8";
	string DBTable = "FMS_ReceiveDocuments";
	string DBTablePK = "ID";
	string DBTableTitle = "FileName";
	if(InstanceID.IsNullOrEmpty()){InstanceID = Request.QueryString["instanceid1"];}
	YJ.Platform.Dictionary BDictionary = new YJ.Platform.Dictionary();
	YJ.Platform.WorkFlow BWorkFlow = new YJ.Platform.WorkFlow();
	YJ.Platform.WorkFlowTask BWorkFlowTask = new YJ.Platform.WorkFlowTask();
	string fieldStatus = BWorkFlow.GetFieldStatus(FlowID, StepID);
	LitJson.JsonData initData = BWorkFlow.GetFormData(DBConnID, DBTable, DBTablePK, InstanceID, fieldStatus, "{\"fms_receivedocuments.rddate\":\"yyyy年MM月dd日\",\"fms_receivedocuments.handleterm\":\"yyyy年MM月dd日HH:mm\"}");
	string TaskTitle = BWorkFlow.GetFromFieldData(initData, DBTable, DBTableTitle);
}
<link href="~/Scripts/FlowRun/Forms/flowform.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/FlowRun/Forms/common.js" type="text/javascript" ></script>
<input type="hidden" id="Form_ValidateAlertType" name="Form_ValidateAlertType" value="1" />
<input type="hidden" id="Form_TitleField" name="Form_TitleField" value="FMS_ReceiveDocuments.FileName" />
<input type="hidden" id="Form_DBConnID" name="Form_DBConnID" value="06075250-30dc-4d32-bf97-e922cb30fac8" />
<input type="hidden" id="Form_DBTable" name="Form_DBTable" value="FMS_ReceiveDocuments" />
<input type="hidden" id="Form_DBTablePk" name="Form_DBTablePk" value="ID" />
<input type="hidden" id="Form_DBTableTitle" name="Form_DBTableTitle" value="FileName" />
<input type="hidden" id="Form_AutoSaveData" name="Form_AutoSaveData" value="1" />
<textarea id="Form_DBTableTitleExpression" name="Form_DBTableTitleExpression" style="display:none;width:0;height:0;"></textarea>
<script type="text/javascript">
	var initData = @Html.Raw(BWorkFlow.GetFormDataJsonString(initData));
	var fieldStatus = "1"=="@Request.QueryString["isreadonly"]" ? {} : @Html.Raw(fieldStatus);
	var displayModel = '@DisplayModel';
	$(window).load(function (){
		formrun.initData(initData, "FMS_ReceiveDocuments", fieldStatus, displayModel);
	});
</script>
<style type="text/css">#pdfContainer {
    position: absolute;
    top: 5px;
    height:560px;
    width:95%;
  }</style><script type="text/javascript">$(window).load(function (){
     
    });

    function Selects() {
     var urls = document.location.toString();
　　　var arrObj = urls.split("?");
      var stepid=null;
      if (arrObj.length >1) {
　　　　　　var arrPara = arrObj[1].split("&");
　　　　　　var arr;

　　　　　　for (var i = 0; i < arrPara.length; i++) {
　　　　　　　　arr = arrPara[i].split("=");

　　　　　　　　if (arr != null && arr[0] == 'stepid') {
　　　　　　　　　　stepid=arr[1]
　　　　　　　　}
　　　　　　}
　　　　}
   
    if(stepid=='9824d083-2e04-4641-a224-a392425a5fc5'||stepid==null||stepid=='8c1b32e8-0beb-43ba-b87c-d4d5af3bd6f8'){
      var pdfUrl = document.getElementById("FMS_ReceiveDocuments.LeadershipOpinion3").value;
      var fj =  document.getElementById("FMS_ReceiveDocuments.FlieAddress_text").value;
     if(pdfUrl!="" && fj!="" && pdfUrl!=null && fj!=null){
      document.getElementById("pdfContainer").attributes.src.value =pdfUrl;
      document.getElementById("ifTr").style.height = "600px";
    }
    }else{
      var pdfUrl = document.getElementById("myP").children[0].innerHTML;
      if(pdfUrl!="" && pdfUrl!=null ){
      document.getElementById("pdfContainer").attributes.src.value =pdfUrl;
      document.getElementById("ifTr").style.height = "600px";
      }
    }
   
  }</script><p style="display:none;" id="myP"><input id="FMS_ReceiveDocuments.LeadershipOpinion3" type1="flow_text" name="FMS_ReceiveDocuments.LeadershipOpinion3" value="" valuetype="0" type="text" align="left" isflow="1" class="mytext" title=""/></p><p><br/></p><link href="~/Content/Theme/tablenew.css" rel="stylesheet"/><script type="text/javascript">f</script><table class="flowformtable tableF table table-bordered" data-sort="sortDisabled" cellspacing="0" cellpadding="0" align="center"><tbody><tr class="firstRow"><th rowspan="1" colspan="2" valign="middle" align="center"><span class="title">公 文 登 记</span></th></tr><tr><th class="titleT" rowspan="1" colspan="2" valign="middle" align="left"><br/></th></tr><tr class="topTr"><td class="top" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">序号</p><input type="text" type1="flow_serialnumber" id="FMS_ReceiveDocuments.No" maxfiled="No" name="FMS_ReceiveDocuments.No" value="" placeholder="本序号自动生成无需手动录入" sqlwhere="" length="5" isflow="1" class="mytext" title="" readonly="" style="background-color: rgb(232, 232, 232);"/><input type="hidden" value="FMS_ReceiveDocuments.No" name="HasSerialNumber"/><input type="hidden" value="{'formatstring':'','sqlwhere':'','length':'5','maxfiled':'No'}" name="HasSerialNumberConfig_FMS_ReceiveDocuments.No"/></td><td class="top" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">收文备注</p><input type="text" id="FMS_ReceiveDocuments.RDNo" type1="flow_text" name="FMS_ReceiveDocuments.RDNo" value="" valuetype="0" align="left" isflow="1" class="mytext" title=""/></td></tr><tr><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">收文日期</p><input type="text" type1="flow_datetime" id="FMS_ReceiveDocuments.RDDate" name="FMS_ReceiveDocuments.RDDate" value="@(YJ.Utility.DateTimeNew.LongDateTime)" format="yyyy年MM月dd日" defaultvalue="%40(YJ.Utility.DateTimeNew.LongDateTime)" istime="0" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title=""/></td><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">发文单位</p><input type="text" id="FMS_ReceiveDocuments.RDCompany" type1="flow_text" name="FMS_ReceiveDocuments.RDCompany" value="" valuetype="0" align="left" isflow="1" class="mytext" title=""/></td></tr><tr><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">文件号</p><input type="text" id="FMS_ReceiveDocuments.FileNo" type1="flow_text" name="FMS_ReceiveDocuments.FileNo" value="" valuetype="0" align="left" isflow="1" class="mytext" title=""/></td><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">文件名称</p><input type="text" id="FMS_ReceiveDocuments.FileName" type1="flow_text" name="FMS_ReceiveDocuments.FileName" value="" valuetype="0" align="left" isflow="1" class="mytext" title=""/></td></tr><tr><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">文件类型</p><select class="mycombox" id="FMS_ReceiveDocuments.FileType" name="FMS_ReceiveDocuments.FileType" datasource="1" listmode="0" isflow="1" type1="flow_combox"><option value="3"></option><option value="0">加密公文</option><option value="1">紧急公文</option><option value="2">普通公文</option><option value="4">督办公文</option></select></td><td class="Tradio" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">是/否需要落实</p><input type="radio" name="FMS_ReceiveDocuments.ToConfirm" id="FMS_ReceiveDocuments.ToConfirm_0" value="1" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="FMS_ReceiveDocuments.ToConfirm_0" style="vertical-align:middle;margin-right:3px;">是</label><input type="radio" name="FMS_ReceiveDocuments.ToConfirm" id="FMS_ReceiveDocuments.ToConfirm_1" value="2" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="FMS_ReceiveDocuments.ToConfirm_1" style="vertical-align:middle;margin-right:3px;">否</label></td></tr><tr><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">数量</p><input type="text" id="FMS_ReceiveDocuments.count" type1="flow_text" name="FMS_ReceiveDocuments.count" value="" valuetype="0" align="left" isflow="1" class="mytext" title=""/></td><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">处理期限</p><input type="text" type1="flow_datetime" id="FMS_ReceiveDocuments.HandleTerm" name="FMS_ReceiveDocuments.HandleTerm" value="" format="yyyy年MM月dd日HH:mm" defaultvalue="" istime="0" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title=""/></td></tr><tr><td class="bottom" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">公文</p><input type="text" type1="flow_files" id="FMS_ReceiveDocuments.FlieAddress" name="FMS_ReceiveDocuments.FlieAddress" value="" style="width:55%" filetype="" isflow="1" class="myfile" title=""/></td><td rowspan="1" colspan="1" valign="middle" align="left"><br/></td></tr></tbody></table>